package com.daka.tools.wechatPay;

import lombok.Data;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
 * @author jayLi
 *         <p>
 *         Returned result from wechat payment
 */
@Data
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class RefundResult extends MchBaseResult {

    @XmlElement
    @XmlJavaTypeAdapter(value = AdaptorCDATA.class)
    private String transaction_id;

    @XmlElement
    @XmlJavaTypeAdapter(value = AdaptorCDATA.class)
    private String out_trade_no;

    @XmlElement
    @XmlJavaTypeAdapter(value = AdaptorCDATA.class)
    private String out_refund_no;

    @XmlElement
    @XmlJavaTypeAdapter(value = AdaptorCDATA.class)
    private String refund_id;

    @XmlElement
    @XmlJavaTypeAdapter(value = AdaptorCDATA.class)
    private String refund_channel;

    @XmlElement
    @XmlJavaTypeAdapter(value = AdaptorCDATA.class)
    private String refund_fee;

    @XmlElement
    @XmlJavaTypeAdapter(value = AdaptorCDATA.class)
    private String total_fee;

    private int cash_fee;

    // @Override
    // public String toString() {
    // return "device_info: " + device_info + ", trade_type: " + trade_type + ", prepay_id: " + prepay_id
    // + ",code_url: " + code_url;
    // }
}
